package com.qf.service.impl;

import com.qf.entity.Emp;
import com.qf.mapper.EmpMapper;
import com.qf.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class EmpServiceImpl implements EmpService {
    @Autowired
    private EmpMapper empMapper;
    @Override
    public Emp findEmpByEmpno(int empno) {
        return empMapper.findEmpByEmpno(empno);
    }

    @Override
    public List<Emp> findAll() {
        return empMapper.findAll();
    }

    @Override
    public int addEmp(Emp emp) {
        return empMapper.addEmp(emp);
    }

    @Override
    public int deleteByEmpno(int empno) {
        return empMapper.deleteByEmpno(empno);
    }

    @Override
    public int updateEmp(Emp emp) {
        return empMapper.updateEmp(emp);
    }

    @Override
    public List<Emp> searchEmp(HashMap<String, Object> map) {
        return empMapper.searchEmp(map);
    }

    @Override
    public void updateEmp2(Emp emp) {
        empMapper.updateEmp2(emp);
    }

    @Override
    public void deleteEmp(List<Integer> nos) {
        empMapper.deleteEmp(nos);
    }
}
